<?php

namespace App\View\Components;

use App\Models\FilmTypeMaster;
use App\Models\MakeMaster;
use App\Models\Warranty;
use Illuminate\Http\Request;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\DB;
use Illuminate\View\Component;

class MYSelect extends Component
{
    /**
     * Create a new component instance.
     *
     * @return void
     */
    public function __construct(Request $request)
    {
    }

    /**
     * Get the view / contents that represent the component.
     *
     * @return \Illuminate\View\View|string
     */
    public function render()
    {
        $items = $this->items();
        return view('components.p-f-select', [
            'items' => $items,
        ]);
    }

    public function items()
    {
        $datas = MakeMaster::get(['year_id']);
        $years = Arr::pluck($datas, 'year_id');
        rsort($years);

    }
}
